package cn.xerllent.wxtp.utils;


/**
 * 通讯录变更消息指令
 * @author sxh
 */
public enum ContactEnum {

	CREATE_USER("create_user", "创建成员通知"),
    UPDATE_USER("update_user", "更新成员通知"),
    DELETE_USER("delete_user", "删除成员通知"),
    CREATE_PARTY("create_party", "新增部门事件"),
    UPDATE_PARTY("update_party", "更新部门事件"),
    DELETE_PARTY("delete_party", "删除部门事件"),
    UPDATE_TAG("update_tag", "标签成员变更事件");

    ContactEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static ContactEnum getByInstance(String key){
        for (ContactEnum value : ContactEnum.values()) {
            if (value.key.equalsIgnoreCase(key)){
                return value;
            }
        }
        return null;
    }
    
    private String key;

    private String desc;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
